package com.tang.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tmh
 * @date 2024/4/19 21:45
 * @description
 */
@RestController
public class SecKillController {

    @Autowired
    private StringRedisTemplate redisTemplate;

    /**
     * 秒杀接口
     * 1.去重
     * 2.库存预扣减
     * 消息放入mq
     * @param goodsId
     * @param userId 真实的项目中 要从token里面拿
     * @return
     */
    @GetMapping("secKill")
    public String doSecKill(Integer goodsId,Integer userId){

    }
}
